<?php

	session_start();

	require 'NotORM.php';
	$pdo = new PDO('mysql:host=localhost;dbname=app', 'app', 'app');
	$structure = new NotORM_Structure_Convention(
		$primary = 'id',
		$foreign = "%sId",	//	overrides default value "%s_id"
		$table = '%s', 
		$prefix = ''
	);
	$db = new NotORM($pdo, $structure);
	
	require 'Slim/Slim.php';
	\Slim\Slim::registerAutoloader();
	$app = new \Slim\Slim();
	
	require 'routes/authentication.php';
	require 'routes/user.php';
	require 'routes/company.php';
	require 'routes/profilePatient.php';
	
	$app->run();
	

